package conson.tech.manage.scene.excel.converter;

/**
 * @Description: 培训枚举
 * @author: yuwenshuo
 * @since: 2019/5/5 9:23
 */

public class TrainingEnum {

    public enum OrderState {
        NOT_PAY(1,"待支付"),
        PAYING(2,"支付中"),
        NOT_VERIFY(3,"待使用"),
        VERIFIED(4,"待评价"),
        FINISH(5,"已完成"),
        CLOSE(6,"已失效"),


        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        OrderState(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (OrderState enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }


    }


    public enum OrgState {
        DISPlay(1,"显示"),
        DIDE(0,"隐藏"),


        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        OrgState(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (OrgState enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }


    }


    public enum TeacherFlag {
        FULL(1,"全职"),
        PART(0,"兼职"),
        LEAVE(0,"离职"),
        OTHER(0,"其他"),


        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        TeacherFlag(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (TeacherFlag enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }


    }


    public enum CourseState {
        PUBLISHED(0,"已发布"),
        UNPUBLISHED(1,"未发布"),
        CANCELED(2,"已撤回 "),

        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        CourseState(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (CourseState enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }

    }

    public enum StockState {
        PURCHASE(0,"不限购"),
        LIMIT_PURCHASE(1,"限购"),

        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        StockState(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (StockState enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }

    }

    public enum AuditState {
        //0-已通过,1-未审核 2-审核中 3-未通过
        PASSED(0,"已通过"),
        UNREVIEWED(1,"未审核"),
        UNDER_REVIEW(2,"审核中"),
        NOT_PASS(3,"未通过"),

        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        AuditState(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (AuditState enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }

        public static Integer getCodeByValue(String value) {
            for (AuditState enumData : values()) {
                if (value.equals(enumData.getDescription())) {
                    return enumData.getCode();
                }
            }
            return null;
        }

    }

    public enum CourseType {
        EXPERIENCE(1,"体验课"),
        OFFICIAL(2,"正式课"),

        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        CourseType(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (CourseType enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }

    }

    public enum CommonState {
        YES(0, "有"),
        NO(1, "无")


        ;

        private Integer code;

        private String description;

        public Integer getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        CommonState(Integer code, String description) {
            this.code = code;
            this.description = description;
        }


        public static String getValueByCode(Integer code) {
            for (CommonState enumData : values()) {
                if (code.equals(enumData.getCode())) {
                    return enumData.getDescription();
                }
            }
            return null;
        }


    }



}
